<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .father {
      width: 300px;
      height: 300px;
      background-color: skyblue;
    }

    .father::after {
      /* 必加的属性 */
      content: '我是一个伪元素after';
      /* 转换显示方式 */
      display: block;
      width: 100px;
      height: 100px;
      background-color: pink;
    }

    .father::before {
      /* 必加的属性 */
      content: '';
      /* 转换显示方式 */
      display: block;
      width: 100px;
      height: 100px;
      background-color: orange;
      background-image: url(./images/1.jpg);
    }
  </style>
</head>
<body>
  <div class="father">
    我是father内部的内容
  </div>
</body>
</html>